import java.awt.Rectangle;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;


public class ViewReportGUI extends JFrame{
	
	private JComboBox getReportType = null;
	private JComboBox getDates = null;
	private JComboBox getCompareTo = null;
	private JButton getView = null;
	private JPanel contentPane = null;
	private JLabel dateLable = null;
	private JLabel compareLable = null;
	private String type[] = {"Compleint report" , "Archive report", "Package usage report"};
	
	public ViewReportGUI()
	{
		super();
	    JPanel contentPane=new JPanel();
	
	    contentPane.setBorder(new TitledBorder(null, "View Report", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		   //Main Window panel 
	    contentPane.setLayout(null);
	    contentPane.setOpaque(true);
	    contentPane.add(getReportType());
	    contentPane.add(getDates());   	
	    contentPane.add(getCompareTo());
	    contentPane.add(getView());
	    contentPane.add(dateLable());
	    contentPane.add(compareLable());


		  //Frame
	        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	        this.setTitle("Produce report window");
	        this.setContentPane(contentPane);  
		    this.setLocationRelativeTo(null); //This will center the JFrame in the middle of the screen
	        this.setLocationByPlatform(true);
	        this.setSize(600, 365);
	        this.setVisible( true ); // display frame
	
	}
	
	
	/**
	 * This method initializes Report Type ComboBox	
	 */
	private JComboBox getReportType() {
		if (getReportType == null) {
			getReportType = new JComboBox(type);
			getReportType.setMaximumRowCount(3);
			getReportType.setBounds(new Rectangle(50, 56, 200, 29));
			getReportType.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
									
				}
			});
		}
		return getReportType;
	}

	/**
	 * This method initializes get Dates ComboBox		
	 */
	private JComboBox getDates() {
		if (getDates == null) {
			getDates = new JComboBox();
			getDates.setMaximumRowCount(100);
			getDates.setBounds(new Rectangle(50, 185, 200, 29));
			getDates.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
					
				}
			});
		}
		return getDates;
	}
	
	/**
	 * This method initializes Compare to ComboBox		
	 */
	private JComboBox getCompareTo() {
		if (getCompareTo == null) {
			getCompareTo = new JComboBox();
			getCompareTo.setBounds(new Rectangle(298, 185, 210, 29));
			getDates.setMaximumRowCount(100);
			getCompareTo.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
					
				}
			});
		}
		return getCompareTo;
	}
	/**
	 * This method initializes View Button		
	 */	
	private JButton getView() {
		if (getView == null) {
			getView = new JButton();
			getView.setBounds(new Rectangle(70, 250, 121, 35));
			getView.setText("View");
			getView.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{
									
				}
			});
		}
		return getView;
	}
	/**
	 * This method initializes Date Label		
	 */	
	private JLabel dateLable() {
		if (dateLable == null) {
			dateLable = new JLabel("choose Date ");
			dateLable.setBounds(new Rectangle(60, 145, 140, 45));
		}
		return dateLable;
	}
	/**
	 * This method initializes Compare to Label		
	 */	
	private JLabel compareLable() {
		if (compareLable == null) {
			compareLable = new JLabel("Compare to ");
			compareLable.setBounds(new Rectangle(310, 145, 300, 45));
		}
		return compareLable;
	}
}

